/*
Time :2021-04-14 15:26:13
author :selfeasy
email :selfeasy@qq.com
desc:
*/
package main

import (
	"fmt"

	"gitee.com/selfeasy/go_lib/set"
	"gitee.com/selfeasy/go_lib/utils"
)

func main() {
	a := []string{"l", "e", "n", "v", "e"}
	b := []string{"e", "v", "l", "t", "w", "e"}
	// s1 := make([]interface{}, len(a))
	// s2 := make([]interface{}, len(b))
	// for i, v := range a {
	// 	s1[i] = v
	// }
	// for i, v := range b {
	// 	s2[i] = v
	// }
	s1 := utils.StrConvert(a)
	s2 := utils.StrConvert(b)
	fmt.Printf("si:%#v\n", s1)
	c := set.InterSet(s1, s2)
	fmt.Printf("InterSet:%#v\n", c)
	d := set.DiffSet(s1, s2)
	fmt.Printf("DiffSet:%#v\n", d)
	m := set.DiffSet(s2, s1)
	fmt.Printf("DiffSet:%#v\n", m)
	e := set.UnionSet(s1, s2)
	fmt.Printf("UnionSet:%#v\n", e)
	f := set.SuppleSet(s1, s2)
	fmt.Printf("SuppleSet:%#v\n", f)

	g := set.ItemInSlice("le", s1)
	fmt.Println("data in slice：", g)
}
